package com.atwisdom.star.auth.service.impl;

import com.atwisdom.star.common.util.CurrentDbType;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atwisdom.star.auth.pojo.Menu;
import com.atwisdom.star.auth.service.MenuService;
import com.atwisdom.star.auth.mapper.MenuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
* @author fushb
* @description 针对表【menu】的数据库操作Service实现
* @createDate 2022-07-18 15:04:53
*/
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu>
    implements MenuService{
    @Autowired
    private CurrentDbType currentDbType;
    @Override
    public Map<String, Object> getTableColumns() {
        System.out.println(currentDbType.getType());
        return this.baseMapper.getTableColumns(currentDbType.getType());
    }
    @Override
    public List<Long> getMenuIdList(Long userId) {
        return this.baseMapper.getMenuIdList(userId);
    }
}




